package diwuzhou;

public class Student {
    private String sno;//学生学号
    private String sname;//学生姓名
    public static int count=0;
    int math,chinese;//数学和语文成绩
    public Student(){
        count++;
    }//无参构造器
    public Student(String sno,String sname,int math,int chinese)
    {
        this.chinese=chinese;
        this.sno=sno;
        this.sname=sname;
        this.math=math;
        count++;
    }
    public void setChinese(int chinese) {
        this.chinese = chinese;
    }
    public int getChinese() {
        return chinese;
    }
    public void setMath(int math) {
        this.math = math;
    }
    public static int getCount() {
        return count;
    }
    public void setSname(String sname) {
        this.sname = sname;
    }

    public String getSname() {
        return sname;
    }

    public int getMath() {
        return math;
    }
    public void setSno(String sno) {
        this.sno = sno;
    }
    public String getSno() {
        return sno;
    }

    @Override
    public String toString() {
        return "学号:" + sno +
                ", 姓名:" + sname +
                ", 数学:" + math +
                ", 语文:" + chinese;
    }
}
